#pragma once
interface IByteStreamReader
{
public:
    IByteStreamReader::IByteStreamReader(void* pBaseAddr)
    {
        m_pBaseAddr = NULL;
        if(pBaseAddr != NULL)
            m_pBaseAddr = pBaseAddr;
    }
    virtual IByteStreamReader::~IByteStreamReader()
    {

    }
    virtual bool ReadBytesFromMemAddr(void* resValue, size_t nSize) = 0;
    virtual void UpdateEIPAddress(int iStep)
    {
        if(m_pBaseAddr == NULL)
            return;
        DWORD address = (DWORD)m_pBaseAddr;
        m_pBaseAddr = (void*)(address + iStep);
    }
    void * GetCurrentBaseAddr()
    {
        return m_pBaseAddr;
    }
    void SetCurrentBaseAddress(void * newAddr)
    {
        m_pBaseAddr = newAddr;
    }

private:
    void* m_pBaseAddr;
};